package practice.aop.spring.board;

import org.springframework.beans.factory.annotation.Configurable;

import practice.aop.spring.board.dao.ArticleDao;

//  스프링이  제공하는  주입방식을  그대로  이용
@Configurable
public class Article {
	private  int  id;
	private ArticleDao  articleDao;
	public Article()  {
	}
	public Article(int  id)  {
	this.id =  id;
	}
	public  int getId()  {
	return  id;
	}
	public  void  increaseReadCount()  {
	articleDao.updateReadCount(id,  1);
	}
	public  void  setArticleDao(ArticleDao  articleDao)  {
	this.articleDao =  articleDao;
	}
}
